import Vue from 'vue';
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
    {
        path: '/',
        component: () => import('@/components/sy'),
        meta: {
            title: "E民宝"
        }
    },
    {
        path: '/blcrj',
        component: () => import('@/pages/blcrj'),
        meta: {
            title: "行政许可"
        }
    },
    {
        path: '/dkwlwd',
        component: () => import('@/pages/dkwlwd'),
        meta: {
            title: "船舶搭靠外轮许可服务指南（日照站）"
        }
    },
    {
        path: '/gatwd',
        component: () => import('@/pages/gatwd'),
        meta: {
            title: "港澳台船员及其随行家属登陆许可服务指南（日照站）"
        }
    },
    {
        path: '/qzdywd',
        component: () => import('@/pages/qzdywd'),
        meta: {
            title: "枪支（弹药）携运许可服务指南（日照站）"
        }
    },
    {
        path: '/qrz',
        component: () => import('@/pages/qrz'),
        meta: {
            title: "去认证"
        }
    },
    {
        path: '/zbcl',
        component: () => import('@/pages/zbcl'),
        meta: {
            title: "准备材料"
        }
    },
    {
        path: '/lqzj',
        component: () => import('@/pages/lqzj'),
        meta: {
            title: "领取证件"
        }
    },
    {
        path: '/rzdf',
        component: () => import('@/pages/rzdf'),
        meta: {
            title: "日照东方客货班轮"
        }
    },
    {
        path: '/xwzx',
        component: () => import('@/pages/xwzx'),
        meta: {
            title: "新闻资讯"
        }
    },
    {
        path: '/xwzxx',
        component: () => import('@/pages/xwzxx'),
        meta: {
            title: "新闻资讯"
        }
    },
    {
        path: '/zbclxx',
        component: () => import('@/pages/zbcl/zbclxx'),
        meta: {
            title: "详情"
        }
    },
    {
        path: '/zbclxxa',
        component: () => import('@/pages/zbcl/zbclxxa'),
        meta: {
            title: "详情"
        }
    },
    {
        path: '/zbclxxb',
        component: () => import('@/pages/zbcl/zbclxxb'),
        meta: {
            title: "详情"
        }
    },
    {
        path: '/zbclxxc',
        component: () => import('@/pages/zbcl/zbclxxc'),
        meta: {
            title: "详情"
        }
    },
    {
        path: '/zbclxxd',
        component: () => import('@/pages/zbcl/zbclxxd'),
        meta: {
            title: "详情"
        }
    },
    {
        path: '/zbclxxe',
        component: () => import('@/pages/zbcl/zbclxxe'),
        meta: {
            title: "详情"
        }
    },
    {
        path: '/tjrz',
        component: () => import('@/pages/tjrz'),
        meta: {
            title: "添加认证"
        }
    },
    {
        path: '/gly',
        mode: "history",
        component: () => import('@/pages/gly'),
        meta: {
            title: "管理员认证"
        }
    },
    {
        path: '/gjkx',
        component: () => import('@/pages/gjkx'),
        meta: {
            title: "国际快讯"
        }
    },
    {
        path: '/qqzxxx',
        component: () => import('@/pages/qqzxxx'),
        meta: {
            title: "详情"
        }
    },
    {
        path: '/ywy',
        mode: "history",
        component: () => import('@/pages/ywy'),
        meta: {
            title: "业务员认证"
        }
    },
    {
        path: '/glysqjl',
        component: () => import('@/pages/glysqjl'),
        meta: {
            title: "管理员申请记录"
        }
    },
    {
        path: '/ywysqjl',
        component: () => import('@/pages/ywysqjl'),
        meta: {
            title: "业务员申请记录"
        }
    },
    {
        path: '/wyjbsqjl',
        component: () => import('@/pages/wyjbsqjl'),
        meta: {
            title: "其他相关举报记录"
        }
    },
    {
        path: '/zggmjbjl',
        component: () => import('@/pages/zggmjbjl'),
        meta: {
            title: "中国公民赴境外参与赌博举报记录"
        }
    },
    {
        path: '/wjryjbjl',
        component: () => import('@/pages/wjryjbjl'),
        meta: {
            title: "外籍人员非法入境举报记录"
        }
    },
    {
        path: '/crjjbjl',
        component: () => import('@/pages/crjjbjl'),
        meta: {
            title: "出入境证件相关违法举报记录"
        }
    },
    {
        path: '/tshwsqjl',
        component: () => import('@/pages/tshwsqjl'),
        meta: {
            title: "特殊货物申请记录"
        }
    },
    {
        path: '/sxwgcwd',
        component: () => import('@/pages/sxwgcwd'),
        meta: {
            title: "上下外国船舶许可服务指南（日照站）"
        }
    },
    {
        path: '/wycg',
        component: () => import('@/pages/wycg'),
        meta: {
            title: "我要出国"
        }
    },
    {
        path: '/xxtx',
        component: () => import('@/pages/xxtx'),
        meta: {
            title: "消息提醒"
        }
    },
    {
        path: '/wdsq',
        component: () => import('@/pages/wdsq'),
        meta: {
            title: "我的申请"
        }
    },
    {

        path: '/dyy',
        component: () => import('@/components/dyy'),
        meta: {
            title: "我要举报"
        }
    },
    {
        path: '/jbnr',
        component: () => import('@/components/jbnr'),
        meta: {
            title: "举报内容"
        },
    },
    {
        path: '/jblba',
        component: () => import('@/pages/jblb/jblba/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblbb',
        component: () => import('@/pages/jblb/jblbb/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblbc',
        component: () => import('@/pages/jblb/jblbc/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblbd',
        component: () => import('@/pages/jblb/jblbd/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblbe',
        component: () => import('@/pages/jblb/jblbe/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblbf',
        component: () => import('@/pages/jblb/jblbf/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblbg',
        component: () => import('@/pages/jblb/jblbg/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblbh',
        component: () => import('@/pages/jblb/jblbh/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblby',
        component: () => import('@/pages/jblb/jblby/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jblbj',
        component: () => import('@/pages/jblb/jblbj/index.vue'),
        meta: {
            title: "举报内容列表"
        },
    },
    {
        path: '/jbbd',
        component: () => import('@/components/jbbd'),
    },
    {
        path: '/tjcg',
        component: () => import('@/components/tjcg'),
    },
    // pages
    {
        path: '/tshw',
        component: () => import('@/pages/tshw'),
        meta: {
            title: "特殊货物（快捷通道）"
        }
    },
    {
        path: '/qyrz',
        component: () => import('@/pages/qyrz'),
        meta: {
            title: "企业认证"
        }
    },

]
const router = new VueRouter({

    routes,
    mode: 'hash',
})
router.beforeEach((to, from, next) => {//beforeEach是router的钩子函数，在进入路由前执行
    if (to.meta.title) {//判断是否有标题
        // @ts-ignore
        document.title = to.meta.title
    }
    next()//执行进入路由，如果不写就不会进入目标页
})
export default router